<admintpl file="header" />
</head>
<body>
	<div class="wrap js-check-wrap">
		<ul class="nav nav-tabs">
			<li class="active"><a href="{:U('Admin/NewsCarousel/index')}">轮播图列表</a></li>
			<li ><a href="{:U('Admin/NewsCarousel/add')}">添加轮播图</a></li>
		</ul>
		<!--  <form class="well form-search" name="query_form" id="query_form" method="post" action="{:U('Admin/AppUser/index')}">
			类型id： 
			<input type="text" name="userName" style="width: 120px;" value="{$Think.post.userName}" placeholder="请输入类型id...">
			<input type="button" name="query_form_btn" id="queryBtn" data-action="{:U('Admin/AppUser/index')}" class="btn btn-primary" value="查询" />
		</form>  -->
		<form class="js-ajax-form" action="{:U('Admin/NewsCarousel/listorders')}" method="post" >
		<div class="table-actions">
				<button type="submit" class="btn btn-primary btn-small js-ajax-submit">{:L('SORT')}</button>
			</div>
		<table class="table table-hover table-bordered">
			<thead>
				<tr>
					<th width="50">{:L('SORT')}</th>
					<th>标题</th>
					<th>类型</th>
					<th>图片</th>
					<th>新闻类别</th>
					<th>简介</th>
					<th>操作</th>
				</tr>
			</thead>
			<php>$bt= array(1=>'普通新闻',2=>'图片新闻',3=>'专题新闻',4=>'视频新闻',5=>'直播新闻',6=>'推广');</php>
			<tbody>
				<foreach name="data" item="vo">
				<tr>
					<th width="50"><input name="listorders[{$vo.bId}]" type="text" size="3" value="{$vo.sI}" class="input input-order"></th>
					<td>{$vo.t}</td>
					<td>{$bt[$vo['bT']]}</td>
					<td style="width: 200px;"><a href="{$vo.lU}" target="_blank"><img src="{$vo.iU}" /></a></td>
					<td>{$vo.cN}</td>
					<td style="width: 300px;">{$vo.sm}</td>
					<td>
						<a href='{:U("Admin/NewsCarousel/edit",array("bId"=>$vo['bId'],"sI"=>$vo['sI'],"t"=>$vo['t'],"cI"=>$vo['cI'],"bT"=>$vo['bT'],"lU"=>$vo['lU'],"iU"=>$vo['iU'],"cN"=>$vo['cN'],"sm"=>$vo['sm']))}'>编辑</a>
						<a href='{:U("Admin/NewsCarousel/del",array("bId"=>$vo['bId']))}' class="js-ajax-delete">删除</a>
					</td>
				</tr>
				</foreach>
			</tbody>
		</table>
		<div class="table-actions">
				<button type="submit" class="btn btn-primary btn-small js-ajax-submit">{:L('SORT')}</button>
			</div>
		</form>
		<div class="pagination">{$page}</div>
	</div>
	<script src="__PUBLIC__/js/common.js"></script>
	<script>
	$(document).ready(function(){
		$('input[name="query_form_btn"]').click(function(){
			 $('#query_form').attr('action', $(this).attr('data-action'));
			 $('#query_form').submit();
		});
		
	});
	</script>
</body>
</html>